﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Westwind.Utilities.Configuration;
using Managistics.Model;
using Managistics.Core.Services;
using Managistics.Core.Services.Impl;

namespace Managistics.Core
{
    /// <summary>
    /// Summary description for Class1
    /// </summary>
    public static class GlobalApp
    {
        public static ApplicationConfiguration Configuration { get; set; }

        /// <summary>
        /// All basic data
        /// </summary>
        public static IList<Good> AllGoods { get; set; }
        public static IList<Supplier> AllSuppliers { get; set; }
        public static IList<Customer> AllCustomers { get; set; }
        public static IList<Employee> AllEmployees { get; set; }

        public static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);


        public static List<CfgInputSheetType> ListInputSheetTypes
        {
            get
            {
                List<CfgInputSheetType> ls = new List<CfgInputSheetType>();
                ls.Add(new CfgInputSheetType(1, "Nhap dieu chinh du"));
                //ls.Add(new CfgInputSheetType(2, "Nhap khuyen mai")); // for later
                ls.Add(new CfgInputSheetType(3, "Nhap noi bo"));
                ls.Add(new CfgInputSheetType(4, "Nhap tra khach hang"));
                return ls;
            }
        }

        static GlobalApp()
        {
            // Create an instance of the class with default provider
            Configuration = new ApplicationConfiguration();
            Configuration.Initialize();
        }
    }


    public class CfgInputSheetType
    {
        private int _id;
        private string _text;

        public CfgInputSheetType(int id, string text)
        {
            this._id = id;
            this._text = text;
        }

        public int TypeId
        {
            get { return this._id; }
            set { this._id = value; }
        }

        public string TypeText
        {
            get { return this._text; }
            set { this._text = value; }
        }
    }
}